<template>
	<view class="flex-col page">
		<view>
			<view :style="{height:statusBarHeight+'px'}"></view>
			<u-navbar :title="title" bgColor="#F5F5F5" @leftClick="$nav(2)">	
			</u-navbar>
		</view>
		
		<view class="help-list" v-for="(item,index) in list" :key="index">
			<view class="flex-row justify-between items-center list-item" @click="itemClick(item)">
				<text>{{item.title}}</text>
				<u-icon name="arrow-right" size="18"></u-icon>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'',
				id:'',
				list:[]
			};
		},
		onLoad(op) {
			this.title = op.title;
			this.id = op.id;
			this.getCategoryList();
		},
		computed:{
			statusBarHeight(){
				return this.$store.state.statusBarHeight + 44
			}
		},
		methods:{
			itemClick(item){
				
				let pack = encodeURIComponent(JSON.stringify(item))
				uni.navigateTo({
					url:'/pages/mine/help/help_detail?obj='+pack
				})
			},
			getCategoryList(){
				this.$request({
					url:'?c=User&a=helpList',
					type:'post',
					data:{
						help_id:this.id
					}
				}).then(res =>{
					this.list = res.data;
				})
			}
		}
	}
</script>

<style lang="scss">
.page{
	width: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	height: 100%;
}
.help-list{
	background-color: #fff;
	margin-top: 10rpx;
	padding: 20rpx 30rpx 20rpx 30rpx;
	
}
.list-item{
	height: 90rpx;
}
</style>
